package com.ebs.md.mock;

/**
 * Revision Author:
 *  $File: //depot/MarketData/fxmonitor/main/src/test/java/com/ebs/md/mock/JmsSessionMock.java $
 *  $Revision: #2 $
 *  $DateTime: 2012/05/09 08:34:18 $
 *  $Change: 110893 $
 *  $Author: Arik.Sher $
 */

import java.io.Serializable;

import javax.jms.BytesMessage;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.StreamMessage;
import javax.jms.TemporaryQueue;
import javax.jms.TemporaryTopic;
import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.jms.TopicSubscriber;

import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQObjectMessage;

/**
 *
 * currently implementing only :
 *   the createBytesMessage  - relying on ActiveMQ existing class.
 *   the createObjectMessage - relying on ActiveMQ existing class.
 * 
 * @author asher
 */
public class JmsSessionMock
implements Session
{

	
	@Override
	public BytesMessage createBytesMessage() throws JMSException {
		return new ActiveMQBytesMessage();
	}

	@Override
	public ObjectMessage createObjectMessage(Serializable serializable)
	throws JMSException {
		ObjectMessage objectMessage = new ActiveMQObjectMessage();
		objectMessage.setObject(serializable);
		return objectMessage;
	}
	
	@Override
	public ObjectMessage createObjectMessage() throws JMSException {
		return new ActiveMQObjectMessage();
	}

	@Override
	public void close() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void commit() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public QueueBrowser createBrowser(Queue queue, String s)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public QueueBrowser createBrowser(Queue queue) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MessageConsumer createConsumer(Destination destination, String s,
			boolean flag) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MessageConsumer createConsumer(Destination destination, String s)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MessageConsumer createConsumer(Destination destination)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TopicSubscriber createDurableSubscriber(Topic topic, String s,
			String s1, boolean flag) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TopicSubscriber createDurableSubscriber(Topic topic, String s)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MapMessage createMapMessage() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public Message createMessage() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MessageProducer createProducer(Destination destination)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public Queue createQueue(String s) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public StreamMessage createStreamMessage() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TemporaryQueue createTemporaryQueue() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TemporaryTopic createTemporaryTopic() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TextMessage createTextMessage() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public TextMessage createTextMessage(String s) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public Topic createTopic(String s) throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public int getAcknowledgeMode() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public MessageListener getMessageListener() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public boolean getTransacted() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void recover() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void rollback() throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void run() {
		throw new UnsupportedOperationException();
	}

	@Override
	public void setMessageListener(MessageListener messagelistener)
			throws JMSException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void unsubscribe(String s) throws JMSException {
		throw new UnsupportedOperationException();
	}

}
